/*********************************************************************************************
 *
 *				Function to return count of matching string 							 *
 *
 ********************************************************************************************/
#include "mystrings.h"


int  mystrspn ( const char * main , const char * sub)
{									/* function to return the matching count of 2 strings */
	const char  * temp1  =  main ;
	const char  * temp2  =  sub ;

	for  ( ; *temp1 ; temp1++) {
		for (  temp2 = sub ; *temp2 &&*temp1 != *temp2  ; temp2++)
			;
		if ( *temp2 == '\0' )
			return (int) (temp1 - main) ;
	}
	return (int) (temp1 -main );
}

